package com.wxzz.elearing.course.service.openfeign;

import com.wxzz.elearing.course.service.openfeign.sentinel.EnterpriseFeignImpl;
import com.wxzz.elearning.common.dto.FeignEnterpriseDto;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "1122-wxzzlearn-user-model",fallback = EnterpriseFeignImpl.class)
public interface IEnterpriseFeign {

    @RequestMapping(value = "/enterprise-api/selectEnterpriseById", method = RequestMethod.POST)
    ReturnVO<String> selectEnterpriseById(@RequestParam("enterpriseId") Long enterpriseId);

    /**
     * 查询所有企业id
     *
     * @return
     */
    @RequestMapping(value = "/enterprise-api/selectAllEnterprise", method = RequestMethod.POST)
    List<Long> selectAllEnterprise();

    /**
     * 查询企业详情
     * @param enterpriseId
     * @return
     */
    @RequestMapping(value = "/enterprise-api/selectEnterpriseDtoById/{enterpriseId}", method = RequestMethod.POST)
    FeignEnterpriseDto selectEnterpriseDtoById(@PathVariable Long enterpriseId);

    /**
     * 查询改提案
     * @param wxUserId
     * @return
     */
    @RequestMapping(value = "enterprise-api/selectWxUserCenterImprove/{wxUserId}", method = RequestMethod.POST)
    Integer selectWxUserCenterImprove(@PathVariable Long wxUserId);
}
